home *** CD-ROM | disk | FTP | other *** search
- { DATACQ - demonstrates various simple data acquisition methods
- using DAN's ANALOG, DIGITAL, DELAY, and TIME functions.
- }
-
- { Method 1 - acquire a fixed number of samples as fast as possible }
-
- dur = 1000; step=1; {get 1001 samples}
- type = "Hit 'carriage return' to start data acquisition";
- acq1 = ANALOG(16);
- label = "Method 1 - Fixed number of samples";
- xlabel = "Sample Number";
- ylabel = "Counts";
- ymin = min(acq1) & ymax = max(acq1);
- plot(acq1);
- pause;
-
-
- { Method 2 - acquire fixed number of samples with time tags }
-
- step = 1; dur = 2000;
- acq2 = 2.704*ANALOG(1) + 11.123 & time2 = time;
- label = "Method 2 - Fixed number of samples with time tags";
- xlabel = "Time of Day When Sample Acquired";
- ylabel = "Some Engineering Units";
- ymin = min(acq2) & ymax = max(acq2) &
- txmin = min(time2) & txmax = max(time2);
- constant(txmin); constant(txmax);
- xmin = txmin; xmax = txmax;
- xaxis = time2;
- xformat = hours;
- erase;
- plot(acq2);
- pause;
-
-
-
- { Method 3 - acquire analog & digital data at slow speed with fixed intevals
- between samples }
-
- step = .2; {step size should = delay time}
- dur = 60; {acquire for 1 minute }
- {get data, convert to eng units,
- determine plot scaling, and delay .2secs between samples}
- acq3 = .5*ANALOG(2)-50 & ymin = min(acq3) & ymax = max(acq3) &
- dig1 = 100*DIGITAL(1) & delay(.2);
- xaxis = t; {reset to nominal}
- label = "Method 3 - 1 minute of data sampled every .2 seconds";
- xlabel = "Relative Time When Sample Taken";
- erase;
- plot(acq3) & plot(dig1);
- pause;
- pause;
-